{% load i18n djangobmf_angularjs %}{% spaceless %}
<table class="table table-striped table-condensed table-hover">
    <thead>
        <tr>
            <th width="60%">{% trans "Name" %}</th>
            <th width="25%">{% trans "Employee" %}</th>
            <th width="15%">{% trans "State" %}</th>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="obj in data" ng-class="obj.state == 'cancelled' || obj.state == 'finished' ? 'text-muted' : ''">
            <td>
                <span ng-if="obj.completed == false" class="glyphicon glyphicon-unchecked"></span>
                <span ng-if="obj.completed == true" class="glyphicon glyphicon-check"></span>
                <span>&nbsp;</span>
                <a bmf-detail="{% ng "obj.pk" %}" href="#">{% ng "obj.summary" %}</a>
                <span>&nbsp;</span>
                <span ng-if="obj.state == 'review'" class="label label-info">{% ng "obj.state_name" %}</span>
                <span ng-if="obj.state == 'started'" class="label label-primary">{% ng "obj.state_name" %}</span>
                <span ng-if="obj.state == 'hold'" class="label label-default">{% ng "obj.state_name" %}</span>
                <span ng-if="obj.state == 'todo'" class="label label-warning">{% ng "obj.state_name" %}</span>
                <span ng-if="obj.project || obj.goal" class="text-muted"><br><small>
                    <strong ng-if="obj.project">{% ng "obj.project_name" %}&nbsp;</strong>
                    <span ng-if="obj.goal">{% ng "obj.goal_summary" %}</span>
                </small></span>
            </td>
            <td>
                <span ng-if="obj.employee != null">{% ng "obj.employee_name" %}</span>
                <span ng-if="obj.employee == null">{% trans "None" %}</span>
                <span ng-if="obj.due_date"><br><small>{% trans "Due" %}: {% ng "obj.due_date" %}</small></span>
            </td>
            <td>{% ng "obj.state_name" %}<br><small>{% ng "obj.modified_date" %}</small>
            </td>
        </tr>
    </tbody>
    {% block related_tfoot %}
    <tfoot ng-if="scopename=='related'">
      <tr>
        <td colspan="3" class="text-right">
          <a class="btn btn-xs bmf-edit btn-success" bmf-form="create" href="{% url "djangobmf:moduleapi_djangobmf_task_task:create" "default" %}">
            <span class="glyphicon glyphicon-plus"></span>
          </a>
        </td>
      </tr>
    </tfoot>
    {% endblock %}
</table>
{% endspaceless %}
